package com.xabg.template.service.impl;

import com.xabg.template.entity.User;
import com.xabg.template.mapper.UserMapper;
import com.xabg.template.service.IUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xabg
 * @since 2018-09-17
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {

    @Autowired
    UserMapper userMapper;

    /**
     * 根据年龄筛选用户信息
     *
     * @param age
     * @return
     */
    @Override
    public List<User> findByAge(int age) {
        return userMapper.findByAge(age);
    }
}
